package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.mapper.AnnouncementsMapper;
import com.tanhua.model.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
@DubboService
public class AnnouncementsApiImpl implements AnnouncementsApi {

    @Autowired
    private AnnouncementsMapper announcementsMapper;

    @Override
    public List<Announcement> findByids(Integer page, Integer pagesize) {
        QueryWrapper qw=new QueryWrapper();
        qw.orderByDesc("updated");
        return announcementsMapper.selectList(qw);
    }
}
